type Person = {
  name: string;
  age: number;
};

type MyReadonly<T, K = any> = {
  readonly [key in keyof T as key extends K ? key : never]: T[key]
} & {
  [key in keyof T as key extends K ? never : key] : T[key]
}

type M = MyReadonly<Person, 'name'>